package com.bingo.mpa.pojo;

import java.sql.Timestamp;
import java.util.Map;

import org.apache.commons.beanutils.BeanUtils;
import org.express.portal.persist.POJO;

public class Pay extends POJO
{
	private static final long serialVersionUID = 1L;
	private long pid;
	private byte pay_type;
	private String pay_id;
	private String s_account;
	private Timestamp pay_time;
	private String client_ip;
	private String product_name;
	private String product_desc;
	private int amount;
	private Timestamp rsp_time;
	private String notify_id;
	private String trade_no;
	private Timestamp trade_time;
	private String bank_code;
	private String bank_seq_no;
	private int pay_amount;
	private byte rsp_result;
	private String rsp_remark;
	
	public Pay()
	{
		super._this_table_name = "P_PAY";
		this.amount = 0;
		this.pay_amount = 0;
	}

	public long getPid()
	{
		return pid;
	}

	public void setPid(long pid)
	{
		this.pid = pid;
	}

	public byte getPay_type()
	{
		return pay_type;
	}

	public void setPay_type(byte pay_type)
	{
		this.pay_type = pay_type;
	}

	public String getPay_id()
	{
		return pay_id;
	}

	public void setPay_id(String pay_id)
	{
		this.pay_id = pay_id;
	}

	public String getS_account()
	{
		return s_account;
	}

	public void setS_account(String s_account)
	{
		this.s_account = s_account;
	}

	public Timestamp getPay_time()
	{
		return pay_time;
	}

	public void setPay_time(Timestamp pay_time)
	{
		this.pay_time = pay_time;
	}

	public String getClient_ip()
	{
		return client_ip;
	}

	public void setClient_ip(String client_ip)
	{
		this.client_ip = client_ip;
	}

	public String getProduct_name()
	{
		return product_name;
	}

	public void setProduct_name(String product_name)
	{
		this.product_name = product_name;
	}

	public String getProduct_desc()
	{
		return product_desc;
	}

	public void setProduct_desc(String product_desc)
	{
		this.product_desc = product_desc;
	}

	public int getAmount()
	{
		return amount;
	}

	public void setAmount(int amount)
	{
		this.amount = amount;
	}

	public Timestamp getRsp_time()
	{
		return rsp_time;
	}

	public void setRsp_time(Timestamp rsp_time)
	{
		this.rsp_time = rsp_time;
	}

	public String getNotify_id()
	{
		return notify_id;
	}

	public void setNotify_id(String notify_id)
	{
		this.notify_id = notify_id;
	}

	public String getTrade_no()
	{
		return trade_no;
	}

	public void setTrade_no(String trade_no)
	{
		this.trade_no = trade_no;
	}

	public Timestamp getTrade_time()
	{
		return trade_time;
	}

	public void setTrade_time(Timestamp trade_time)
	{
		this.trade_time = trade_time;
	}

	public String getBank_code()
	{
		return bank_code;
	}

	public void setBank_code(String bank_code)
	{
		this.bank_code = bank_code;
	}

	public String getBank_seq_no()
	{
		return bank_seq_no;
	}

	public void setBank_seq_no(String bank_seq_no)
	{
		this.bank_seq_no = bank_seq_no;
	}

	public int getPay_amount()
	{
		return pay_amount;
	}

	public void setPay_amount(int pay_amount)
	{
		this.pay_amount = pay_amount;
	}

	public byte getRsp_result()
	{
		return rsp_result;
	}

	public void setRsp_result(byte rsp_result)
	{
		this.rsp_result = rsp_result;
	}

	public String getRsp_remark()
	{
		return rsp_remark;
	}

	public void setRsp_remark(String rsp_remark)
	{
		this.rsp_remark = rsp_remark;
	}
	
	@SuppressWarnings("unchecked")
	protected Map<String, Object> listInsertableFields()
	{
		try
		{
			Map<String, Object> props = BeanUtils.describe(this);
			if (getId() <= 0)
			{
				if(props.containsKey("id"))
				{
					props.remove("id");
				}
				if(props.containsKey("pid"))
				{
					props.remove("pid");
				}
			}
			props.remove("class");
			return props;
		}
		catch (Exception e)
		{
			throw new RuntimeException("Exception when Fetching fields of " + this);
		}
	}
}
